import numpy as np
import matplotlib as MP
import pylab as P
#--------------------
def rgrid():
    import grid_data as GD 
    lfluid,lforcing,lparticle,limmersed_boundary,n1,n2,length,xx0,yy0 = GD.rgrid_param();
    pgrid(n1,n2,length,xx0,yy0)
    if (limmersed_boundary == 1) :
        rbound=np.loadtxt('immersed_boundary_points.ascii')
        P.plot(rbound[:,0],rbound[:,1],'r.')
# --------------------------------------
def pgrid(n1=64,n2=64,length=2*np.pi,xx0=-np.pi,yy0=-np.pi):
    dx=length/n1
    dy=length/n2
    xx=xx0+np.linspace(0,n1,num=n1)*dx
    yy=yy0+np.linspace(0,n2,num=n2)*dy
    P.clf()
    for ix in range(0,n1):
        xvert=xx[ix]+np.zeros(n2)
        P.plot(xvert,yy,'b-')
    for iy in range(0,n2):
        yhoriz=yy[iy]+np.zeros(n1)
        P.plot(xx,yhoriz,'b-')
#************************************#
if __name__ == '__main__':
  main();
else:
  print 'Importing Grid Maker for spectral soap'
